package com.yaoxuguang.concurrence.wait_notify.producer_consumer.ontToOne;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.wait_notify.producer_consumer.ontToOne
 * @Description: 生产者的线程
 * @date 2018年12月21日18:08
 */
public class ThreadP extends Thread {
    private Producer producer;

    public ThreadP(Producer producer) {
        this.producer = producer;
    }

    @Override
    public void run() {
        while (true) {
            producer.setValue();
        }
    }
}
